precision mediump float; // 中精度浮点数

attribute vec2 position;
attribute vec2 uv;

uniform vec2 u_resolution;//canvas的尺寸
uniform vec2 mouseMove;//鼠标位置
uniform vec2 u_radio;//比例

varying vec2 uvs;
varying vec2 vPosition;
varying vec2 uMouse;

void main( ){

//计算鼠标的位置
    uMouse = mouseMove / u_resolution;
    // uMouse /= u_resolution;
    // uMouse -= vec2( 1. );

    // uMouse +=vec2(1.);
    // uMouse *= 2.;

    // uMouse *= vec2( 1. , - 1. );

    uvs = uv;
//计算几何体的坐标位置
    vec2 pointPos = position * u_radio / u_resolution;

    pointPos *= 2.;
    pointPos -= vec2( 1. );

    pointPos *= vec2( 1. , - 1. );

    gl_Position = vec4( pointPos , 0. , 1. );

}
